<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>S6办公系统</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">
function check(){
	var name =document.getElementById("name").value.toLowerCase();
	if(name==""){
		alert('部门名称不能为空');
		 return false;
		}
 return true;
	}
</script>
  </head>

<body style="background-color:#D6D3C9">

<form action="departmentsave.action" method="post" onsubmit="return check()">
<table width="60%" border="0">
  <tr>
    <td colspan="2" style="text-align:center">修改部门信息</td>
  </tr>
  <tr>
    <td>部门名称</td>
    <td><s:hidden name="departmentinfo.id"></s:hidden><input type="text" id="name" name="departmentinfo.name" value="<s:property value="departmentinfo.name"/>"/></td>
  </tr>
  <tr>
    <td>所属机构</td>
    <td>
 <s:select value="" name="departmentinfo.branchinfo.id" theme="simple" list="list_branchinfo" listKey="id" listValue="name" >   
      </s:select>
    </td>
  </tr>
  <tr>
    <td>部门负责人</td>
    <td>
    <s:select value="" name="departmentinfo.userinfo.id" theme="simple" list="list_userinfo" listKey="id" listValue="name">   
      </s:select>
    </td>
  </tr>
  <tr>
    <td>部门描述</td>
    <td><textarea rows="5" cols="40" name="departmentinfo.describe"><s:property value="departmentinfo.describe"/></textarea>  				
</td>
  </tr>
  <tr>
    <td colspan="2"><input type="submit" value="保存"/><input type="button" value="返回" onclick="location.href='javascript:history.back()'"/></td>
  </tr>
</table>
</form>
</body>
</html>